#ifndef UPLOADDIALOG_H
#define UPLOADDIALOG_H
#include "ui_uploaddialog.h"
#include <QDialog>

namespace Ui {
class UploadDialog;
}

class UploadDialog : public QDialog
{
    Q_OBJECT

public:
    explicit UploadDialog(QWidget *parent = nullptr);
    ~UploadDialog();

    QString title() const { return ui->title->text(); }
    QString content() const { return ui->content->toPlainText(); }

private slots:
    void on_btn_close_clicked();

    void on_btn_upload_clicked();

private:
    void init();
    void initStyleSheet();
    void initPanel();

    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    bool _isDraging = false;
    QPoint _dragPosition;

private:
    Ui::UploadDialog *ui;
};

#endif // UPLOADDIALOG_H
